package com.itheima.hello.缓冲流;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;

public class commonsIoTest {
    public static void main(String[] args) throws Exception{
           //拷贝文件
            FileUtils.copyFile(new File("helloworld-app\\src\\com\\itheima\\hello\\缓冲流\\itheima01out.txt"), new File("helloworld-app\\src\\com\\itheima\\hello\\缓冲流\\itheimaout04.txt"));
            FileUtils.copyDirectory(new File("D:\\壁纸\\鹏弟壁纸"),new File("D:\\壁纸\\鹏弟壁纸01"));//拷贝文件夹,重复拷贝会覆盖原来的
            //可以删除文件夹，无论是否非空
            FileUtils.deleteDirectory(new File("D:\\壁纸\\鹏弟壁纸01"));
    }
}
